<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <script src="../js/hls.min.js"></script>
    <!-- <script src="https://cdn.jsdelivr.net/hls.js/latest/hls.min.js"></script> -->
    <script src="../js/vide7.5.5/js/video.min.js"></script>
</head>
<body>
<video id="video" controls style="width:60%;height:60%;"></video>
<script src="../js/jquery-1.10.2/jquery-1.10.2.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
    // window.onload = myfun;
    //
    // function myfun() {
    //
    // }
    $.ajax({
        type: "GET",
        url: "/Camera/getCamera",
        dataType: "json",
        success: function (data) {

            var rtmp = 'http://localhost:9090/Live/camera/hls.m3u8';
            if (Hls.isSupported()) {
                var video = document.getElementById('video');
                var hls = new Hls();
                hls.loadSource(rtmp);
                hls.attachMedia(video);
                video.play();
            }
        }
    });

</script>
</body>
</html>
